<!--
	作者：956911785@qq.com
	时间：2019年10月24日01:28:08
	描述：学生个人中心-书籍
-->
<template>
	<Modal :title="title" v-model="modal0" closable fullscreen>
		<div style="width:100%;">
			<template v-for="item,index in paramlist">
				<div style="width:100%;float:left;padding-bottom:20px;">
					<div style="width:100%;float:left;">
						<label style="font-size: 20px;font-weight: bold;">{{index+1}}、{{item.BOOKNAME}}</label>
					</div>
					
					<template v-for="item1,index1 in item.readlog">
						<div style="width:100%;float:left;margin-top:10px;">
							<label style="font-size:14px;width:100%;float:left;font-weight: bold;">({{index1+1}})、打卡日期：{{item1.ADDTIME}}</label>
						</div>

						<template v-if="item1.GOODSENTENCE || item1.hchjhd.length>0">
							<div style="width:100%;float:left;margin-top:10px;">
								<label style="font-size:14px;width:100%;float:left;font-weight: bold;">好词好句好段：</label>
								<div v-if="item1.GOODSENTENCE" style="font-size:14px;width:100%;float:left;">
									{{item1.GOODSENTENCE}}
								</div>	
								<div style="width:100%;text-align: center;">
									<template v-for="item2 in item1.hchjhd">
										<img :src="item2.PICURL"  style="float:left;padding-right:10px;">
									</template>
								</div>
							</div>
						</template>
						
						<template v-if="item1.REACTION || item1.zjdhg.length>0">
							<div style="width:100%;float:left;margin-top:10px;">
								<label style="font-size:14px;width:100%;float:left;font-weight: bold;">章节读后感：</label>
								<div v-if="item1.REACTION" style="font-size:14px;width:100%;float:left;">
									{{item1.REACTION}}
								</div>
								<div style="width:100%;text-align: center;float:left;">
									<template v-for="item2 in item1.zjdhg">
										<img :src="item2.PICURL"  style="float:left;padding-right:10px;">
									</template>
								</div>
							</div>	
						</template>
						
						<div v-if="item1.ydjy.length>0" style="width:100%;float:left;margin-top:10px;">
							<div style="font-size:14px;width:100%;float:left;font-weight: bold;">阅读剪影：</div>
							<div style="width:100%;text-align: center;">
								<template v-for="item2 in item1.ydjy">
									<img :src="item2.PICURL"  style="float:left;padding-right:10px;">
								</template>
							</div>
						</div>
						
					</template>
				</div>
			</template>
		</div>
		<div slot="footer">
			<Button type="text"  @click="closeModal()">取消</Button>
			<Button type="primary" @click="download()" >下载</Button>
		</div>
    </Modal>
</template>

<script>
	const _config = require('./../../../../../config/config')
	export default {
		name:"tconent",
		props: {
    		usid:{
    			type:String,	
    			default: function() {
					return ""
				}
    		},
    		title:{
    			type:String,	
    		},
    	},
		data() {
			return {	  
                modal0:false,
                visible: false,
				paramlist:[],
			}
		},
		methods: {
			
            closeModal(){
	      	    this.modal0 = false;
	        },
			
			getStudentDataInfo(){
				var usid=this.usid;
				this.$http.get("/host/readbook/staticlog/getStudentDataInfo.html?usid="+usid)
				.then(datas => {
					const paramlist=datas;
					this.paramlist=paramlist;
				});
			},
			
			download(){
				var usid=this.usid;
				window.open(_config._ADMIN_SERVER+"/readbook/staticlog/exportStudentDataInfo.html?usid="+usid);
			},

		},
		mounted() {
		},
		watch:{
			modal0(news,olds){
				if(news){
					this.getStudentDataInfo();
				}
			}
		},
		computed: {
		
		}
		
	}
</script>

<style scoped="scoped">
	
</style>



